package com.rk.hosp.repository;

import com.rk.hosp.model.hosp.Department;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author :Rk.
 * @date : 2022/11/10
 */
@Repository
public interface DepartmentRepository extends MongoRepository<Department,String> {


    /**
     * 通过医院编号和科室编号 获取科室信息
     * @param hoscode
     * @param depcode
     * @return
     */
    Department getDepartmentByHoscodeAndDepcode(String hoscode, String depcode);

    /**
     * 通过医院编号获取科室信息
     * @param hoscode
     * @return
     */
    List<Department> getDepartmentByHoscode(String hoscode);

}
